\(\int x^2 (a+b \log (c x^n)) \, dx\) [44]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 27 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{9} b n x^3+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/9*b*n*x^3+1/3*x^3*(a+b*ln(c*x^n))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2341} \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{9} b n x^3 \]

[In]

Int[x^2*(a + b*Log[c*x^n]),x]

[Out]

-1/9*(b*n*x^3) + (x^3*(a + b*Log[c*x^n]))/3

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{9} b n x^3+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {a x^3}{3}-\frac {1}{9} b n x^3+\frac {1}{3} b x^3 \log \left (c x^n\right ) \]

[In]

Integrate[x^2*(a + b*Log[c*x^n]),x]

[Out]

(a*x^3)/3 - (b*n*x^3)/9 + (b*x^3*Log[c*x^n])/3

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00

method result size
parallelrisch \(\frac {x^{3} b \ln \left (c \,x^{n}\right )}{3}-\frac {b n \,x^{3}}{9}+\frac {x^{3} a}{3}\) \(27\)
risch \(\frac {b \,x^{3} \ln \left (x^{n}\right )}{3}+\frac {x^{3} \left (-3 i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+3 i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+3 i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-3 i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+6 b \ln \left (c \right )-2 b n +6 a \right )}{18}\) \(112\)

[In]

int(x^2*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/3*x^3*b*ln(c*x^n)-1/9*b*n*x^3+1/3*x^3*a

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{3} \, b n x^{3} \log \left (x\right ) + \frac {1}{3} \, b x^{3} \log \left (c\right ) - \frac {1}{9} \, {\left (b n - 3 \, a\right )} x^{3} \]

[In]

integrate(x^2*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/3*b*n*x^3*log(x) + 1/3*b*x^3*log(c) - 1/9*(b*n - 3*a)*x^3

Sympy [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {a x^{3}}{3} - \frac {b n x^{3}}{9} + \frac {b x^{3} \log {\left (c x^{n} \right )}}{3} \]

[In]

integrate(x**2*(a+b*ln(c*x**n)),x)

[Out]

a*x**3/3 - b*n*x**3/9 + b*x**3*log(c*x**n)/3

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{9} \, b n x^{3} + \frac {1}{3} \, b x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a x^{3} \]

[In]

integrate(x^2*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/9*b*n*x^3 + 1/3*b*x^3*log(c*x^n) + 1/3*a*x^3

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{3} \, b n x^{3} \log \left (x\right ) - \frac {1}{9} \, b n x^{3} + \frac {1}{3} \, b x^{3} \log \left (c\right ) + \frac {1}{3} \, a x^{3} \]

[In]

integrate(x^2*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/3*b*n*x^3*log(x) - 1/9*b*n*x^3 + 1/3*b*x^3*log(c) + 1/3*a*x^3

Mupad [B] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.93 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=x^3\,\left (\frac {a}{3}-\frac {b\,n}{9}\right )+\frac {b\,x^3\,\ln \left (c\,x^n\right )}{3} \]

[In]

int(x^2*(a + b*log(c*x^n)),x)

[Out]

x^3*(a/3 - (b*n)/9) + (b*x^3*log(c*x^n))/3